package com.situ.mall.admin.mapper;

import com.situ.mall.admin.entity.Attachment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author membergpf
 * @since 2023-03-21
 */
public interface AttachmentMapper extends BaseMapper<Attachment> {

    Integer add(Attachment attachment);

    Long maxId();

    @Update("update attachment set source_id=#{proId},source=#{proName},sequence=#{sequence} where id=#{id}")
    void update1(int id, int proId, String proName, int sequence);

    List<Attachment> selectAttach(Integer proid);

    Long selectProIdMax(Integer ProId);

    void insert1(String firstimg, Integer id);
}
